package com.sayimo.maker.mall.orders.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.sayimo.framework.database.mybatis.AbstractMybatisBaseDao;
import com.sayimo.framework.exception.DaoException;
import com.sayimo.maker.mall.orders.dao.OrdersFlowInterfaceDao;
import com.sayimo.maker.mall.orders.vo.OrdersFlow;



@Repository(value="ordersFlowInterfaceDao")
public class OrdersFlowInterfaceImplDao extends AbstractMybatisBaseDao<OrdersFlow> implements OrdersFlowInterfaceDao{

	@Override
	public Integer insertOrdersFlow(OrdersFlow ordersFlow) throws DaoException {
		return mybatisInterfaceBaseDao.insert("com.sayimo.maker.mall.orders.dao.OrdersFlowInterfaceDao.insertOrdersFlow", ordersFlow);
	}
	
	/**
	 * 
	 * @MethodName batchInsertOrdersFlow
	 * @Description 批量新增订单流程
	 * 
	 * @author chenpy
	 * @date 2016年1月8日 下午4:25:29
	 * @param 
	 * @return int
	 * @VERSION 1.0.0
	 */
	public int batchInsertOrdersFlow(List<OrdersFlow> flows) throws DaoException{
		return mybatisInterfaceBaseDao.insert("com.sayimo.maker.mall.orders.dao.OrdersFlowInterfaceDao.batchInsertOrdersFlow", flows);
	}

	/**
	 * 
	 * @MethodName insertProviderOrdersFlow
	 * @Description 新增订单流程
	 * 
	 * @author chenpy
	 * @date 2016年1月8日 下午4:25:29
	 * @param 
	 * @return int
	 * @VERSION 1.0.0
	 */
	@Override
	public void insertProviderOrdersFlow(OrdersFlow flow) throws DaoException {
		 mybatisInterfaceBaseDao.insert("com.sayimo.maker.mall.orders.dao.OrdersFlowInterfaceDao.insertProviderOrdersFlow", flow);
		
	}

	@Override
	public List<OrdersFlow> selectShippedOrder() throws DaoException {
		// TODO Auto-generated method stub
		return  mybatisInterfaceBaseDao.query("com.sayimo.maker.mall.orders.dao.OrdersFlowInterfaceDao.selectShippedOrders");
	}

	@Override
	public List<OrdersFlow> selectUnPayOrder() throws DaoException {
		// TODO Auto-generated method stub
		return mybatisInterfaceBaseDao.query("com.sayimo.maker.mall.orders.dao.OrdersFlowInterfaceDao.selectUnPay");
	}
}
